]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspace: Set maxChromeWidth to window clone width
authorJonas Dreßler <verdre@v0yd.nl>
Thu, 4 Jun 2020 15:39:44 +0000 (17:39 +0200)
committerJonas Dreßler <verdre@v0yd.nl>
Thu, 11 Jun 2020 18:50:08 +0000 (20:50 +0200)
So far we allowed the titles of window overlays to expand their width to
be larger than the actual WindowClone, they could expand to the full
size of the Workspace.

Since we're now going to implement those titles as part of the
WindowClone itself, having this feature is no longer possible as easily
as it was before. That's because the clones are stacked according to the
stacking of the actual windows, and since the overlay-elements are
attached to those clones, they will also be shown underneath other
clones.

So stop allowing the titles to expand and limit their size to the width
of the clone, which makes sure titles never get shown above or
underneath other clones.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1298

js/ui/workspace.js

index a64ed0b99db043a9d0b82dde4b75ed1dca52caff..a6967f302b0ff81a8c77888f22971bc661c6bd56 100644 (file)
@@ -1627,11 +1627,7 @@ class Workspace extends St.Widget {
             const cloneHeight = cellHeight;
             clone.slot = [x, y, cloneWidth, cloneHeight];
 
-            let cloneCenter = x + cloneWidth / 2;
-            let maxChromeWidth = 2 * Math.min(
-                cloneCenter - area.x,
-                area.x + area.width - cloneCenter);
-            clone.overlay.setMaxChromeWidth(Math.round(maxChromeWidth));
+            clone.overlay.setMaxChromeWidth(cloneWidth);
 
             if (clone.overlay && (initialPositioning || !clone.positioned))
                 clone.overlay.hide();